.class public final LAEisT/gDqwW;
.super Ljava/lang/Object;

# interfaces
.implements LAEisT/jqaCk;


# instance fields
.field private CZHoD:Z

.field private final KBJHA:LAEisT/Xcscn;

.field private final KxCHL:Ljava/util/zip/Deflater;

.field private final SpRTk:Ljava/util/zip/CRC32;

.field private final vRurG:LAEisT/ZOqoj;


# direct methods
.method public constructor <init>(LAEisT/jqaCk;)V
    .locals 3

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    new-instance v0, Ljava/util/zip/CRC32;

    invoke-direct {v0}, Ljava/util/zip/CRC32;-><init>()V

    iput-object v0, p0, LAEisT/gDqwW;->SpRTk:Ljava/util/zip/CRC32;

    if-nez p1, :cond_0

    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string v1, "sink == null"

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_0
    new-instance v0, Ljava/util/zip/Deflater;

    const/4 v1, -0x1

    const/4 v2, 0x1

    invoke-direct {v0, v1, v2}, Ljava/util/zip/Deflater;-><init>(IZ)V

    iput-object v0, p0, LAEisT/gDqwW;->KxCHL:Ljava/util/zip/Deflater;

    invoke-static {p1}, LAEisT/PZcQo;->qhhul(LAEisT/jqaCk;)LAEisT/Xcscn;

    move-result-object v0

    iput-object v0, p0, LAEisT/gDqwW;->KBJHA:LAEisT/Xcscn;

    new-instance v0, LAEisT/ZOqoj;

    iget-object v1, p0, LAEisT/gDqwW;->KBJHA:LAEisT/Xcscn;

    iget-object v2, p0, LAEisT/gDqwW;->KxCHL:Ljava/util/zip/Deflater;

    invoke-direct {v0, v1, v2}, LAEisT/ZOqoj;-><init>(LAEisT/Xcscn;Ljava/util/zip/Deflater;)V

    iput-object v0, p0, LAEisT/gDqwW;->vRurG:LAEisT/ZOqoj;

    invoke-direct {p0}, LAEisT/gDqwW;->sWGLq()V

    return-void
.end method

.method private GFpSJ()V
    .locals 4

    iget-object v0, p0, LAEisT/gDqwW;->KBJHA:LAEisT/Xcscn;

    iget-object v1, p0, LAEisT/gDqwW;->SpRTk:Ljava/util/zip/CRC32;

    invoke-virtual {v1}, Ljava/util/zip/CRC32;->getValue()J

    move-result-wide v2

    long-to-int v1, v2

    invoke-interface {v0, v1}, LAEisT/Xcscn;->kowdS(I)LAEisT/Xcscn;

    iget-object v0, p0, LAEisT/gDqwW;->KBJHA:LAEisT/Xcscn;

    iget-object v1, p0, LAEisT/gDqwW;->KxCHL:Ljava/util/zip/Deflater;

    invoke-virtual {v1}, Ljava/util/zip/Deflater;->getBytesRead()J

    move-result-wide v2

    long-to-int v1, v2

    invoke-interface {v0, v1}, LAEisT/Xcscn;->kowdS(I)LAEisT/Xcscn;

    return-void
.end method

.method private nDPIN(LAEisT/OyUcY;J)V
    .locals 6

    iget-object v0, p1, LAEisT/OyUcY;->IAjpn:LAEisT/tKkYl;

    :goto_0
    const-wide/16 v2, 0x0

    cmp-long v1, p2, v2

    if-lez v1, :cond_0

    iget v1, v0, LAEisT/tKkYl;->toMAV:I

    iget v2, v0, LAEisT/tKkYl;->dPqZM:I

    sub-int/2addr v1, v2

    int-to-long v2, v1

    invoke-static {p2, p3, v2, v3}, Ljava/lang/Math;->min(JJ)J

    move-result-wide v2

    long-to-int v1, v2

    iget-object v2, p0, LAEisT/gDqwW;->SpRTk:Ljava/util/zip/CRC32;

    iget-object v3, v0, LAEisT/tKkYl;->SGIlX:[B

    iget v4, v0, LAEisT/tKkYl;->dPqZM:I

    invoke-virtual {v2, v3, v4, v1}, Ljava/util/zip/CRC32;->update([BII)V

    int-to-long v2, v1

    sub-long/2addr p2, v2

    iget-object v0, v0, LAEisT/tKkYl;->jdJID:LAEisT/tKkYl;

    goto :goto_0

    :cond_0
    return-void
.end method

.method private sWGLq()V
    .locals 3

    const/4 v2, 0x0

    iget-object v0, p0, LAEisT/gDqwW;->KBJHA:LAEisT/Xcscn;

    invoke-interface {v0}, LAEisT/Xcscn;->cZmGX()LAEisT/OyUcY;

    move-result-object v0

    const/16 v1, 0x1f8b

    invoke-virtual {v0, v1}, LAEisT/OyUcY;->DzMoT(I)LAEisT/OyUcY;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, LAEisT/OyUcY;->AdtXb(I)LAEisT/OyUcY;

    invoke-virtual {v0, v2}, LAEisT/OyUcY;->AdtXb(I)LAEisT/OyUcY;

    invoke-virtual {v0, v2}, LAEisT/OyUcY;->RYlNg(I)LAEisT/OyUcY;

    invoke-virtual {v0, v2}, LAEisT/OyUcY;->AdtXb(I)LAEisT/OyUcY;

    invoke-virtual {v0, v2}, LAEisT/OyUcY;->AdtXb(I)LAEisT/OyUcY;

    return-void
.end method


# virtual methods
.method public BtKiz(LAEisT/OyUcY;J)V
    .locals 4

    const-wide/16 v2, 0x0

    cmp-long v0, p2, v2

    if-gez v0, :cond_0

    new-instance v0, Ljava/lang/IllegalArgumentException;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "byteCount < 0: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p2, p3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_0
    cmp-long v0, p2, v2

    if-nez v0, :cond_1

    :goto_0
    return-void

    :cond_1
    invoke-direct {p0, p1, p2, p3}, LAEisT/gDqwW;->nDPIN(LAEisT/OyUcY;J)V

    iget-object v0, p0, LAEisT/gDqwW;->vRurG:LAEisT/ZOqoj;

    invoke-virtual {v0, p1, p2, p3}, LAEisT/ZOqoj;->BtKiz(LAEisT/OyUcY;J)V

    goto :goto_0
.end method

.method public RRPdk()LAEisT/Keicq;
    .locals 1

    iget-object v0, p0, LAEisT/gDqwW;->KBJHA:LAEisT/Xcscn;

    invoke-interface {v0}, LAEisT/Xcscn;->RRPdk()LAEisT/Keicq;

    move-result-object v0

    return-object v0
.end method

.method public close()V
    .locals 2

    iget-boolean v0, p0, LAEisT/gDqwW;->CZHoD:Z

    if-eqz v0, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    const/4 v1, 0x0

    :try_start_0
    iget-object v0, p0, LAEisT/gDqwW;->vRurG:LAEisT/ZOqoj;

    invoke-virtual {v0}, LAEisT/ZOqoj;->KfafI()V

    invoke-direct {p0}, LAEisT/gDqwW;->GFpSJ()V
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    :goto_1
    :try_start_1
    iget-object v0, p0, LAEisT/gDqwW;->KxCHL:Ljava/util/zip/Deflater;

    invoke-virtual {v0}, Ljava/util/zip/Deflater;->end()V
    :try_end_1
    .catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_1} :catch_1

    move-object v0, v1

    :cond_2
    :goto_2
    :try_start_2
    iget-object v1, p0, LAEisT/gDqwW;->KBJHA:LAEisT/Xcscn;

    invoke-interface {v1}, LAEisT/Xcscn;->close()V
    :try_end_2
    .catch Ljava/lang/Throwable; {:try_start_2 .. :try_end_2} :catch_2

    :cond_3
    :goto_3
    const/4 v1, 0x1

    iput-boolean v1, p0, LAEisT/gDqwW;->CZHoD:Z

    if-eqz v0, :cond_0

    invoke-static {v0}, LAEisT/FUouf;->hZZGw(Ljava/lang/Throwable;)V

    goto :goto_0

    :catch_0
    move-exception v0

    move-object v1, v0

    goto :goto_1

    :catch_1
    move-exception v0

    if-eqz v1, :cond_2

    move-object v0, v1

    goto :goto_2

    :catch_2
    move-exception v1

    if-nez v0, :cond_3

    move-object v0, v1

    goto :goto_3
.end method

.method public flush()V
    .locals 1

    iget-object v0, p0, LAEisT/gDqwW;->vRurG:LAEisT/ZOqoj;

    invoke-virtual {v0}, LAEisT/ZOqoj;->flush()V

    return-void
.end method

.method public pUPer()Ljava/util/zip/Deflater;
    .locals 1

    iget-object v0, p0, LAEisT/gDqwW;->KxCHL:Ljava/util/zip/Deflater;

    return-object v0
.end method
